package interview.huawei.training.p38;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        // 初始高度
        double height = scanner.nextDouble();
        double distance = 0;
        for(int i = 0; i < 5; i++) {
            distance += height;
            height /= 2;
            if(i != 4)
                distance += height;
        }
        System.out.println(distance);
        System.out.println(height);
    }
}